<?php

namespace app\validate\api\recruit;

use think\Validate;

class jobValidate extends Validate
{

    protected $rule = [
        'position' => 'require|max:255',
        'job_type' => 'require',
        'industry_id' => 'require',
        'industry_type_id' => 'require',
      //  'province_id' => 'require',
      //  'city_id' => 'require',
      //  'district_id' => 'require',
    //    'province_name' => 'require',
     //   'city_name' => 'require',
     //   'district_name' => 'require',
    //    'address' => 'require',
        'experience_required' => 'require',
        'salary_min' => 'require',
        'salary_max' => 'require',
        'job_requirements' => 'require',
 //       'is_phone' => 'require',
//        'f_id' => 'require',
//        'u_name' => 'require',
//        'u_phone' => 'require',
        'u_phone' => 'number',
        'phone_count' => 'require',
        'chat_count' => 'require',
        'Integral_usage' => 'require',
        'benefits' => 'require',
    ];

    protected $message = [
        'position' => '职位名称必须填写',
        'job_type.require' => '职位类型必须填写',
        'industry_id.require' => '行业必须填写',
        'industry_type_id.require' => '行业类型必须填写',
//        'province_id.require' => '省id必须填写',
//        'city_id.require' => '市id必须填写',
//        'district_id.require' => '区id必须填写',
//        'province_name.require' => '省名字必须填写',
//        'city_name.require' => '市名字必须填写',
//        'district_name.require' => '区名字必须填写',
//        'address.require' => '详细地址必须填写',
        'experience_required.require' => '工作经验必须填写',
        'salary_min.require' => '薪资最少范围必须填写',
        'salary_max.require' => '薪资最大范围必须填写',
        'job_requirements.require' => '岗位描述必须填写',
        'is_phone.require' => '是否可以让求职者拨打电话咨询岗位必须填写',
//        'f_id.require' => '企业id必须填写',
//        'u_name.require' => '联系人姓名必须填写',
//        'u_phone.require' => '联系人电话必须填写',
        'u_phone.number' => '联系人电话必须为整数',
        'phone_count.require' => '主动打电话次数必须填写',
        'chat_count.require' => '主动聊天次数必须填写',
        'Integral_usage.require' => '使用积分必须填写',
        'benefits.require' => '标签必须填写',
    ];


}